﻿#ifndef TEST2_H
#define TEST2_H

#include <QObject>
#include <QSerialPort>
#include "serialportwrap.h"

class Test2 : public QObject
{
    Q_OBJECT

    enum POSTYPE
    {
        POSA,
        POSB
    };

public:
    explicit Test2(QObject *parent = nullptr);

    void initCommunication(QString com);

    void moveOneStep(int posA,int posB);

signals:

public slots:

private:
    QSerialPort *m_serialPort=nullptr;
    SerialPortWrap *m_wrap=nullptr;
    bool isInPos(POSTYPE posType, int pos);
    bool moveToPos(POSTYPE posType, int pos);
};

#endif // TEST2_H
